import { createRouter, createWebHistory } from 'vue-router'
import HomeView from '../views/HomeView.vue'

const router = createRouter({
  history: createWebHistory(import.meta.env.BASE_URL),
  routes: [
    {
      path: '/',
      name: 'home',
      component: HomeView
    },
    {
      path: '/about',
      name: 'about',
      component: () => import('../views/AboutView.vue')
    },
    {
      path: '/login',
      name: 'login',
      component: () => import('../views/LoginView.vue')
    },
    {
      path: '/course',
      name: 'course',
      component: () => import('../views/CourseView.vue')
    },
    {
      path: '/my',
      name: 'my',
      component: () => import('../views/MyView.vue')
    },
    {
      path: '/resetpwd',
      name: 'resetpwd',
      component: () => import('../views/user/ResetPasswordView.vue')
    },
    {
      path: '/log',
      name: 'log',
      component: () => import('../views/sys/LogView.vue')
    },
    {
      path: '/role',
      name: 'role',
      component: () => import('../views/sys/RoleView.vue')
    },
    {
      path: '/module',
      name: 'module',
      component: () => import('../views/admin/module.vue')
    }
  ]
})

export default router
